//
//  ChangePsdViewController.m
//  Hxcsfw
//
//  Created by qiysoft on 2017/11/14.
//  Copyright © 2017年 企友软mac. All rights reserved.
//

#import "ChangePsdViewController.h"
#import "ChangePsdCell.h"
#define ChangePsdCellIndentifier @"ChangePsdCellIndentifier"

@interface ChangePsdViewController ()<UITableViewDelegate,UITableViewDataSource>
{
    ChangePsdCell *cell1;
}

@end

@implementation ChangePsdViewController

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    self.navigationController.navigationBarHidden = YES;
}

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"修改密码";
    self.navigationController.navigationBarHidden = NO;

    // 1.注册控件
    UINib *cellNib = [UINib nibWithNibName:@"ChangePsdCell" bundle:nil];
    [self.myTableView registerNib:cellNib forCellReuseIdentifier:ChangePsdCellIndentifier];
    _myTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.prototypeCell  = [self.myTableView dequeueReusableCellWithIdentifier:ChangePsdCellIndentifier];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ChangeSuccessOKClick) name:@"ChangeSuccessOK" object:nil];

}

-(void)ChangeSuccessOKClick {
    [self.navigationController popViewControllerAnimated:NO];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//设置UITableViewCell的数据
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    cell1  = [[[NSBundle mainBundle] loadNibNamed:@"ChangePsdCell" owner:self options:nil] lastObject];
    cell1.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell1;
}

//行点击事件
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
}

//分组个数
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

//列表行数
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 1;
}

//设置行高度
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return WSCREENH_HEIGHT;
}


@end
